The present invention relates to a programmable controller, and more particularly to a programmable controller and a sequence control method in which a program including a bit operation (or logical operation) instruction and a word operation (or numerical operation) in a mixed form is executed.
In recent years, a control by a programmable controller is complicated and a sequence control usually includes a PID control therein. Therefore, a control program of the programmable controller includes a bit operation instruction (also called a sequence instruction or a ladder instruction) in a mixed form.
A programmable controller which executes a mixed instruction is known as disclosed by JP-A-56-105505. Such a programmable controller has two instruction execution portions including a dedicated bit operation circuit in a hardware form for executing a bit operation instruction and a dedicated word operation circuit for executing a word operation instruction on the basis of a microprogram. The dedicated word operation circuit executes the word operation instruction it only updates a program number of an instruction to be next executed when a sequence instruction is received.
There is also known a programmable controller, as disclosed by JP-A-61-48001, that is provided with a general purpose microprocessor unit (MPU) for processing of a bit operation instruction. A switching between a dedicated bit operation processor and the MPU is made by a switching instruction inserted at a partition between a bit operation instruction and the word operation instruction. During execution of bit operation, the MPU executes a dummy instruction to step a program.
The above-mentioned conventional programmable controller using the dedicated hardware allows a high-speed processing since a switching between bit operation and word operation becomes unnecessary. However, the development of the hardware requires a long time and the cost is high. Also, the reproduction of the hardware becomes necessary when a word operation instruction is added or changed.
On the other hand, the conventional programmable controller using a general purpose processor is low in cost and can flexibly cope with changes. However, overhead attendant upon the switching between instructions lowers the processing speed of the controller and hence a real-time processing for a complicated object to be controlled encounters some difficulty.